<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/wmsproject/order/Wms_OrderDetail.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/wmsproject/order/Wms_OrderDetail.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name:'Wms_OrderDetail',
        setup() {
            const table = ref({
                key: "OrderDetailId",
                footer: "Foots",
                cnName: "单据明细",
                name: "order/Wms_OrderDetail",
                newTabEdit: false,
                url: "/Wms_OrderDetail/",
                sortName: "OrderDetailId"
            });
            const editFormFields = ref({"ItemOrder":"","MaterialId":"","RequestDate":"","RequestQty":"","RequestLotNo":""});
            const editFormOptions = ref([[{"title":"项次","field":"ItemOrder","type":"number"},
                               {"dataKey":"WMS_Material","data":[],"title":"物料","field":"MaterialId","type":"select"}],
                              [{"title":"需求日期","field":"RequestDate","type":"date"},
                               {"title":"需求数量","field":"RequestQty","type":"number"}],
                              [{"title":"需求批次号","field":"RequestLotNo"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"OrderDetailId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OrderId",title:"单号ID",type:"bigint",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"OrderNo",title:"单号",type:"string",bind:{ key:"WMS_Order",data:[]},width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ItemOrder",title:"项次",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MaterialId",title:"物料",type:"bigint",bind:{ key:"WMS_Material",data:[]},width:160,showOverflowTooltip:true,align:"left"},
                       {field:"RequestDate",title:"需求日期",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"RequestQty",title:"需求数量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"RequestLotNo",title:"需求批次号",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"IqcId",title:"检验单id",type:"bigint",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"IqcStatus",title:"入库单检验状态",type:"int",bind:{ key:"WMS_IqcStatus",data:[]},width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ActualQty",title:"实际发生数量",type:"decimal",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ErpOrderId",title:"ErpOrderId",type:"bigint",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpDetailId",title:"ERP表明细ID",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpLotId",title:"ERP批次id",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpProductUomId",title:"ErpProductUomId",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpProductUomName",title:"ErpProductUomName",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpLocationId",title:"源位置id",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpLocationName",title:"源位置名称",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpLocationDestId",title:"目的位置id",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ErpLocationDestName",title:"目的位置名称",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
